package com.example.professorevaluation.dao

import androidx.room.*
import com.example.professorevaluation.bean.RateBean

@Dao
interface RateDao {
    @Query("select * from t_rate")
    fun getAll(): List<RateBean>

    @Query("select * from t_rate where content = :name")
    fun getRate(name: String): RateBean

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(rateBean: RateBean)

    @Update(onConflict = OnConflictStrategy.REPLACE)
    fun update(rateBean: RateBean)

    @Delete
    fun delete(rateBean: RateBean)


}